Skip to content

Conversation

@mkirkeng-leukeleu
Copy link
Member

@mkirkeng-leukeleu mkirkeng-leukeleu commented Oct 7, 2025

  • Only show help text if there are errors on registration form.
Form without any errors Screenshot 2025-10-07 at 17 35 55
Form after user has submitted with invalid inputs Screenshot 2025-10-07 at 17 25 50

Edit:

Updated demo video
Screen.Recording.2025-10-10.at.12.27.25.mov

Ideally we'd like to use `Meta.help_texts` to override the help text fields but that only works on fields generated from models (see the note under: https://docs.djangoproject.com/en/5.2/topics/forms/modelforms/#overriding-the-default-fields
Help text doesn't really have any bearing on the errors, got them mixed up I think.
@153957
Copy link
Member

153957 commented Oct 8, 2025

Should the same be done for the PasswordChangeForm and PasswordResetForm? or don't those have the same help text?

@ramonakira
Copy link
Member

I actually feel the form benefits from always showing the password help_text? What's the reason it has to be removed in the initial state?

@153957
Copy link
Member

153957 commented Oct 8, 2025

See the referenced issue (FIT-134) for the original motivation.

@mkirkeng-leukeleu
Copy link
Member Author

mkirkeng-leukeleu commented Oct 8, 2025

Should the same be done for the PasswordChangeForm and PasswordResetForm? or don't those have the same help text?

Could be, but maybe because those ones are full page forms (for some reason) I find it less of an issue there:

Screenshot image

🤷

This way the base_form can still be overridden by child templates while allowing those child templates like user_creation_form to still be overridden themselves.
@github-actions github-actions bot added the templates Pull requests that update templates label Oct 10, 2025
For some reason the request object is not added into the form rendering (also not by the "request" context processor, so manually add it into the context. The request object is needed to get the csp nonce within form templates.
@mkirkeng-leukeleu mkirkeng-leukeleu marked this pull request as draft October 10, 2025 16:18
@mkirkeng-leukeleu
Copy link
Member Author

I've updated the PR description with a new demo video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package templates Pull requests that update templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants